//
//  KQChatConfig.swift
//  KQChatKit
//
//  Created by zhouxiang on 2021/9/1.
//

import UIKit


/// 获取屏幕宽度
public let KQCHAT_SCREEN_WIDTH: CGFloat = UIScreen.main.bounds.size.width
/// 获取屏幕高度
public let KQCHAT_SCREEN_HEIGHT: CGFloat = UIScreen.main.bounds.size.height
/// 状态栏高度
public let KQCHAT_STATUS_HEIGHT: CGFloat = UIApplication.shared.statusBarFrame.size.height
/// NavigationBar高
public let KQCHAT_NAVIGATIONBAR_HEIGHT: CGFloat = 44
/// 顶部安全距离
public let KQCHAT_SAFE_AREA_TOP_HEIGHT: CGFloat = KQCHAT_STATUS_HEIGHT + KQCHAT_NAVIGATIONBAR_HEIGHT
/// 底部安全距离
public let KQCHAT_SAFE_AREA_BOTTOM_HEIGHT: CGFloat = KQCHAT_STATUS_HEIGHT > 20.0 ? 34.0 : 0.0

/// 常规体
public let KQCHAT_FONT_NAME = "PingFangSC-Regular"
/// 中黑体
public let KQCHAT_FONT_MEDIUM_NAME = "PingFangSC-Medium"

/// RGB颜色
public func KQCHAT_COLOR(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat) -> UIColor {
    return UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: 1)
}


/// 背景色
public let KQCHAT_BG_COLOR = KQCHAT_COLOR(242, 242, 242)


extension UIDevice {
    func isAboveiPhoneX() ->Bool {
        let screenHeight = UIScreen.main.nativeBounds.size.height;
        if screenHeight == 2436 || screenHeight == 1792 || screenHeight == 2688 || screenHeight == 1624 {
            return true
        }
        return false
    }
}
